package com.kzw.oa.byxt.web;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.kzw.core.mapper.Jackson;
import com.kzw.core.web.action.BaseAction;
import com.kzw.oa.byxt.service.StatsService;

@Controller
@Scope("prototype")
public class StatsAction extends BaseAction {

	@Autowired
	private StatsService statsService;
	
	/** 
	 * 首页中的图表
	 * 	题目来源
	 * 	题目类型
	 * 	题目预选情况（未被选、待确认、已确认）
	 * 	学生预选情况（未预选、预选成功、预选失败、预选中）
	 */
	public String showChart() {
		
		List<Map<String, Object>> result = statsService.showChart();
		jsonString = Jackson.me().toJson(result);
		return SUCCESS;
	}

}
